package site.hugboy.reggie.common;

/**
 * 基于ThreadLocal封装一个工具类，用于保存/获取当前登录用户的id
 */
public class BaseContext {
    public static ThreadLocal<Long> tl = new ThreadLocal<>();

    public static void setCurrentId(Long id){
        tl.set(id);
    }

    public static Long getCurrentId(){
        return tl.get();
    }
}
